package com.nie.orderfood.Utils;

import com.nie.orderfood.VO.ProductVO;
import com.nie.orderfood.VO.ResultVO;

import java.util.List;

/**
 * @program: orderfood
 * @description: http请求对象封装对象
 * @author: NieMiao
 * @create: 2018-10-08 15:52
 **/
public class ResultUtils {

    public static ResultVO success(List<ProductVO> productVOList){
        ResultVO resultVO = new ResultVO();
        resultVO.setCode(0);
        resultVO.setMsg("成功");
        resultVO.setData(productVOList);
        return resultVO;
    }
    public static ResultVO success(Object object) {
        ResultVO resultVO = new ResultVO();
        resultVO.setData(object);
        resultVO.setCode(0);
        resultVO.setMsg("成功");
        return resultVO;
    }
    public static ResultVO success() {
        ResultVO resultVO = new ResultVO();
        resultVO.setCode(0);
        resultVO.setMsg("成功");
        return resultVO;
    }
}
